from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^recommendation/', include('recommendation.urls')),
    (r'^friends/', include('my_friends.urls')),
    (r'^movies/', include('my_movies.urls')),
    (r'^groups/', include('my_groups.urls')),
    # Examples:
    # url(r'^$', 'RSM.views.home', name='home'),
    # url(r'^RSM/', include('RSM.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
)

urlpatterns += staticfiles_urlpatterns()

# 'main' views
urlpatterns += patterns('RSM.views',
    url(r'^$','index'),
    url(r'^login/$','custom_login'),
    url(r'^register/$','custom_register'),
    url(r'^aboutUs/$','about_us'),
    url(r'^profile/$','custom_profile'),
)

if settings.DEBUG:
    # cache creation views
    urlpatterns += patterns('',
        (r'^resetCacheFiles/$', 'RSM.algorithm.search.makeCache.createBestMoviesFiles'),
        (r'^resetCache/$', 'RSM.algorithm.search.makeCache.makeCache'),
    )
